<script>
    import ActionList from "../base/ActionList.svelte";
    import {onMount} from "svelte";
    import action from "../../scripts/character/action.js";
    import Remilia from "../../scripts/character/instance/Remilia.js";

    export let where;
    export let character = action.init(new Remilia());
    onMount(
        () => {
            list_self = [...character.get_self_action_list ()];
        }
    )
    let list_self;
</script>

<div class="characterActionList">
    <b style="display: block;margin: 0px 4px 10px">
        {character.name} ({where.col}, {where.row})
    </b>

    <hr>
    {#if list_self}
        {#each list_self as self_item}
            <ActionList {where} item={self_item}/>
        {/each}
    {/if}
</div>

<style lang="less">
  .characterActionList {
    padding: 10px 0;
    box-sizing: border-box;
  }
</style>